﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true"   EnableEventValidation="false" 
    CodeBehind="xiaoZhang2.aspx.cs" Inherits="WEB.T_bill.xiaoZhang2" %>
   
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript">
    function openDialog(srcW, srcH, srcU, sl) {
        var X = 0;
        var Y = 0;
        var Cstyle;
        X = (screen.width - srcW) / 2;
        Y = (screen.height - srcH) / 2;
        Cstyle = "dialogLeft:" + X + "px;dialogTop:" + Y + "px;dialogHeight:" + srcH + "px;dialogWidth:" + srcW + "px;help:no;status:no;scroll:" + sl;
        var sReturnVal = window.showModalDialog(srcU, window, Cstyle);
        if (sReturnVal == undefined) {
            sReturnVal = window.returnValue;
        }
        return sReturnVal;
    }

    function OpenChildWinGZ() {
        var result = openDialog('500', '300', '../T_bill/GuaZhang.aspx', 'no');
        if (result != "" && result != null) {
            document.getElementById("<%=btnXiaoZhangYS.ClientID%>").value = result;
        }
    }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    委托单查询
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <script type="text/javascript" src="../js/My97DatePicker/WdatePicker.js"></script>
    <table style="width: 100%;">
        <tr>
            <td>
                <table class="distance" width="650px">
                    <tr>
                        <td align="right">
                            时间段:
                        </td>
                        <td align="left" class="style8">
                            <asp:TextBox ID="tbTimestart" runat="server" class="Wdate" MaxLength="10"></asp:TextBox>
                            至<asp:TextBox ID="tbTimestop" runat="server" class="Wdate" MaxLength="10"></asp:TextBox>
                            <asp:DropDownList ID="ddlorder" runat="server" 
                                AutoPostBack="True" onselectedindexchanged="ddlorder_SelectedIndexChanged">
                                <asp:ListItem Value="desc">降序</asp:ListItem>
                                <asp:ListItem Value="asc">升序</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                     
                    </tr>
      
        <tr>
            <td align="right">
                <asp:DropDownList ID="ddlQuery" runat="server" Style="text-align: right" Width="101px">
                  <asp:ListItem Value="CustomerName">客户名</asp:ListItem>
                  
                   <asp:ListItem Value=" headLadingBillNo">头程提单号</asp:ListItem>
                                <asp:ListItem Value="ladingBillNO">提单号</asp:ListItem>
                                <asp:ListItem Value="goodsName">货物名称</asp:ListItem>
                                <asp:ListItem Value="shipname">船名</asp:ListItem>
                                <asp:ListItem Value="PO">订单号</asp:ListItem>
                                <asp:ListItem Value="filingNO">归档号</asp:ListItem>
                                <asp:ListItem Value="inspectionNo">报检单号</asp:ListItem>
                                <asp:ListItem Value="customsNo">报关单号</asp:ListItem>
                                <asp:ListItem Value=" a.sheetID">委托单单号</asp:ListItem>
                </asp:DropDownList>
                 </td>
                
                  <td><asp:TextBox ID="tbQuery" runat="server" Width="360px"></asp:TextBox>
                            <asp:Button ID="btnQuery" runat="server" Text="   查  询" OnClick="btnQuery_Click"
                                Style="margin-left: 8px" CssClass="Submit_Query" />
                        </td>
                         </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:GridView ID="gvSheetInfo" runat="server" CellPadding="4" CssClass="distance"
                    DataKeyNames="sheetID" ForeColor="Black" GridLines="Vertical" OnSelectedIndexChanging="gvSheetInfo_SelectedIndexChanging"
                    Style="text-align: center" AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE"
                    BorderStyle="None" BorderWidth="1px" Width="1200px" AllowPaging="True" 
                    onpageindexchanging="gvSheetInfo_PageIndexChanging1" onrowdatabound="gvSheetInfo_RowDataBound" 
                  >
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:BoundField DataField="sheetID" HeaderText="委托单号" />
                        <asp:TemplateField >
                        <ItemTemplate>
                        <asp:CheckBox id="cbxXiaoZhang" runat="Server" />
                        </ItemTemplate>
                            <ControlStyle Height="29px" Width="29px" />
                        </asp:TemplateField>
                        <asp:BoundField DataField="PO" HeaderText="订单号" />
                        <asp:BoundField DataField="typeID" HeaderText="类型" />
                        <asp:BoundField DataField="inOut" HeaderText="进出口" />
                        <asp:BoundField DataField="CustomerName" HeaderText="客户" />
                      
                        <asp:BoundField DataField="agencyDate" HeaderText="日期" DataFormatString="{0:d}" />
                        <asp:BoundField DataField="shipName" HeaderText="船名" />
                        <asp:BoundField DataField="customsNo" HeaderText="报关单号" />
                        <asp:BoundField DataField="inspectionNo" HeaderText="报检号" />
                        <asp:BoundField DataField="ladingBillNo" HeaderText="提单号" />
                        <asp:BoundField DataField="headLadingBillNo" HeaderText="头程提单号" />
                        <asp:BoundField DataField="goodsName" HeaderText="货物名称" />
                        
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                  <PagerTemplate>
     <br />
     <asp:Label ID="lblPage" runat="Server" Text='<%# "第" +( ((GridView)Container.NamingContainer).PageIndex +1 ) +"页/共"+ (((GridView)Container.NamingContainer).PageCount) +"页" %>'></asp:Label>
     <asp:LinkButton ID="lbnFirst" runat="Server" Text="首页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>' CommandName="Page" CommandArgument="First" ></asp:LinkButton>
     <asp:LinkButton ID="lbnPrev" runat="server" Text="上一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>' CommandName="Page" CommandArgument="Prev" ></asp:LinkButton>
     <asp:LinkButton ID="lbnNext" runat="Server" Text="下一页" Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>' CommandName="Page" CommandArgument="Next" ></asp:LinkButton> 
     <asp:LinkButton ID="lbnLast" runat="Server" Text="尾页"   Enabled='<%# ((GridView)Container.NamingContainer).PageIndex != (((GridView)Container.NamingContainer).PageCount - 1) %>' CommandName="Page" CommandArgument="Last" ></asp:LinkButton> 
      到第
       <asp:TextBox ID="tbinPageNum" runat="server"></asp:TextBox>
      页 
      <asp:Button ID="Button1" CommandName="go" runat="server" Text ="go"  OnClick="Button1_Click" 
     
     />
      
       <br />
</PagerTemplate>


                </asp:GridView>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<asp:Button 
                    ID="btnXiaoZhangYS" runat="server" Text="应收销账" 
                    CssClass="Submit_yellowbig" onclick="btnXiaoZhangYS_Click" Width="74px" />
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnXiaoZhangYF" runat="server" Text="应付销账" 
                    CssClass="Submit_gvbig" onclick="btnXiaoZhangYF_Click" Height="22px" 
                    Width="74px" />
            </td>
        </tr>
    </table>
    <div class="descrption">
        <asp:Label ID="Label1" runat="server" Text=" -- 备注：</br>-- <font color=#0066CC>1、当委托单的应收、应付款都销账之后，就不再显示在此页面</font></br>-- <font color=#0066CC>2、若只是销了应收账款，该委托单就显示为黄色</font></br>-- <font color=#0066CC>3、若只是销了应付账款，该委托单就显示为蓝色</font>">
        </asp:Label>
    </div>
    <table width ="100%">
    <tr><td align ="center" >   <asp:Label ID ="lbj" runat ="server" Text ="" ></asp:Label></td> </tr>
    
    
    </table>
</asp:Content>
